package com.wodsy.phoenix.dataobject.shopc.model;

import com.wodsy.phoenix.dataobject.base.PhoenixObject;
import com.wodsy.phoenix.dataobject.base.PhoenixRequest;
import com.wodsy.phoenix.dataobject.base.PhoenixResponse;

import javax.persistence.*;
import java.io.Serializable;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Created by Huang on 2015/4/28.
 */
@Entity
@Table(name = "tb_promise", catalog = "shopc")
public class Promise extends PhoenixObject implements Serializable,PhoenixRequest,PhoenixResponse {
    private int promiseId;
    private String desc;
    private int seqNum;

    public Promise() {
    }

    public Promise(int promiseId, String desc, int seqNum) {
        this.promiseId = promiseId;
        this.desc = desc;
        this.seqNum = seqNum;
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public int getPromiseId() {
        return promiseId;
    }

    public void setPromiseId(int promiseId) {
        this.promiseId = promiseId;
    }

    @Column(name = "desc")
    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Column(name = "seq_num")
    public int getSeqNum() {
        return seqNum;
    }

    public void setSeqNum(int seqNum) {
        this.seqNum = seqNum;
    }

    @Override
    public String toString() {
        return "Promise{" +
                "promiseId=" + promiseId +
                ", desc='" + desc + '\'' +
                ", seqNum=" + seqNum +
                '}';
    }
}
